﻿<UserControl x:Class="Lithnet.Umare.Presentation.TreeViewItemControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
  
    <StackPanel>
        <StackPanel Orientation="Horizontal"
                    Margin="2">
            <Image Source="{Binding Path=DisplayIcon}"
                   Width="16"
                   Height="16"
                   SnapsToDevicePixels="True" />
            <TextBlock Name="MainTextBlock"
                       Text="{Binding Path=DisplayName}"
                       Margin="5,0" />
        </StackPanel>

        <Control Template="{StaticResource RedUnderlineError}"
                 Visibility="{Binding HasErrors, Converter={StaticResource BooleanToVisibilityConverter}}" />

    </StackPanel>

</UserControl>
